package com.rong.creatmodel.singlemodel.lazy;

public class Client {
    public static void main(String[] args) {
        SingleTonLazy lazy = SingleTonLazy.getInstance();
        SingleTonLazy lazy1 = SingleTonLazy.getInstance();
        System.out.println(lazy==lazy1);


        SingleTonLazy3 l = SingleTonLazy3.getInstance();
        SingleTonLazy3 l1 = SingleTonLazy3.getInstance();
        System.out.println(l ==  l1);

        // JDK中使用的单例模式Runtime 描述程序运行环境的类
        // 使用饿汉式创建对象
        Runtime r = Runtime.getRuntime();
    }
}
